#include<bits/stdc++.h>
using namespace std;
namespace code{
	int n,k;
	signed main(){
		cin>>n>>k;
		n=n+k;
		while(n--){
			string s;
			cin>>s;
			cout<<"1"<<'\n';
		}
		return 0;
	}
}signed main(){
	freopen("replace.in","r",stdin);
	freopen("replace.out","w",stdout);
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	return code::main();
}
